﻿using SMTPAPI.InterfaceImplementation;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Net.Mail;

namespace SMTPAPIUnitTest
{
    
    
    /// <summary>
    ///This is a test class for SMTPSeverSettingsTest and is intended
    ///to contain all SMTPSeverSettingsTest Unit Tests
    ///</summary>
    [TestClass()]
    public class SMTPSeverSettingsTest
    {
        /// <summary>
        ///A test for ConfigureSMTPServerSetting -for Valid Configuration
        ///</summary>
        [TestMethod()]
        public void ConfigureSMTPServerSettingTest_ForValidConfiguration()
        {
            SMTPSeverSettings target = new SMTPSeverSettings(); 
            string smtpServerName = "smtp.gmail.com"; 
            int port = 587; 
            SmtpClient actual;
            actual = target.ConfigureSMTPServerSetting(smtpServerName, port);

            string expectedSmtpServerName = "smtp.gmail.com";
            int expectedPort = 587;

            Assert.AreEqual(expectedSmtpServerName, actual.Host);
            Assert.AreEqual(expectedPort,actual.Port);
        }
    }
}
